package zhi;

/**
 * @classname:dsda
 * @description:
 * @author: Mr.Z
 * @date: 2021/1/17 20:57
 * @version: 0.1
 * @since:1.8
 */
public class dsda {
    public static void main(String[] args) {
        String str = "bacgca";
        System.out.println(str.indexOf("a"));//1
        System.out.println(str.indexOf("a",1));//1

        System.out.println(str.lastIndexOf("a"));//5
        System.out.println(str.lastIndexOf("a",4));//1

        System.out.println("list");
    }
}
